
package io.devops

def DeployK8s(){
    container("maven"){
                writeFile file:'deploy-sample.yaml', text:libraryResource("deploy/yaml")
                sh "cat deploy-sample.yaml"
                withKubeConfig([credentialsId: "dev-kubeconfig"]){
                    sh "kubectl apply -f -"
                }


    }

}



def main(){
    DeployK8s()
}